3.41 \(\int \cos (c+d x) (B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=16 \[ B x+\frac{C \tanh ^{-1}(\sin (c+d x))}{d} \]

[Out]

B*x + (C*ArcTanh[Sin[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0294041, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {4047, 8, 12, 3770} \[ B x+\frac{C \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

B*x + (C*ArcTanh[Sin[c + d*x]])/d

Rule 4047

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int 1 \, dx+\int C \sec (c+d x) \, dx\\ &=B x+C \int \sec (c+d x) \, dx\\ &=B x+\frac{C \tanh ^{-1}(\sin (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0040731, size = 16, normalized size = 1. \[ B x+\frac{C \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

B*x + (C*ArcTanh[Sin[c + d*x]])/d

________________________________________________________________________________________

Maple [A]  time = 0.04, size = 30, normalized size = 1.9 \begin{align*} Bx+{\frac{Bc}{d}}+{\frac{C\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x)

[Out]

B*x+1/d*B*c+1/d*C*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

Maxima [B]  time = 0.932997, size = 50, normalized size = 3.12 \begin{align*} \frac{2 \,{\left (d x + c\right )} B + C{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

1/2*(2*(d*x + c)*B + C*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)))/d

________________________________________________________________________________________

Fricas [B]  time = 0.49889, size = 95, normalized size = 5.94 \begin{align*} \frac{2 \, B d x + C \log \left (\sin \left (d x + c\right ) + 1\right ) - C \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*(2*B*d*x + C*log(sin(d*x + c) + 1) - C*log(-sin(d*x + c) + 1))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (B + C \sec{\left (c + d x \right )}\right ) \cos{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Integral((B + C*sec(c + d*x))*cos(c + d*x)*sec(c + d*x), x)

________________________________________________________________________________________

Giac [B]  time = 1.20795, size = 58, normalized size = 3.62 \begin{align*} \frac{{\left (d x + c\right )} B + C \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - C \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

((d*x + c)*B + C*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - C*log(abs(tan(1/2*d*x + 1/2*c) - 1)))/d